import request from '@/utils/request'

// 查询全部企业部门列表
export function getDepartmentInfo() {
  return request({
    url: '/company/department'
  })
}

// 根据ID修改部门详情
export function editDepartment(data) {
  return request({
    url: '/company/department/' + data.id,
    method: 'put',
    data
  })
}

// 新增部门
export function addDepts(data) {
  return request({
    url: '/company/department/',
    method: 'post',
    data
  })
}

// 根据ID查找部门详情
export function getDeptsById(id) {
  return request({
    url: '/company/department/' + id,
    method: 'get'
  })
}

// 根据ID删除部门
export function delDepartment(id) {
  return request({
    url: '/company/department/' + id,
    method: 'delete'
  })
}

